package com.travel.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * 酒店表
 * @TableName hotel
 */
@Data
@TableName(value ="hotel")
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "hotel")
public class Hotel implements Serializable {
    /**
     * 酒店id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 城市id
     */
    @TableField(value = "city_id")
    private Integer cityId;

    /**
     * 酒店名
     */
    @TableField(value = "name")
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String name;

    /**
     * 详细地址
     */
    @TableField(value = "address")
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String address;

    /**
     * 酒店介绍
     */
    @TableField(value = "hotel_desc")
    private String hotelDesc;

    /**
     * 酒店平均价格
     */
    @TableField(value = "price")
    private Integer price;

    /**
     * 设施
     */
    @TableField(value = "facility")
    private String facility;

    /**
     * 酒店星级
     */
    @TableField(value = "star")
    private Integer star;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

}